package com.feng.overlay;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.Projection;

public class CycleOverlay extends Overlay 
{
	private GeoPoint point = null;
	
	public CycleOverlay (GeoPoint point)
	{
		this.point = point;
	}

	@Override
	public void draw(Canvas canvas, MapView mapView, boolean shadow) 
	{
		// TODO Auto-generated method stub
		super.draw(canvas, mapView, shadow);
		
		Projection proj = mapView.getProjection();
		
		Paint paint = new Paint ();
		paint.setARGB(250, 255, 0, 0);
		paint.setAntiAlias(true);
		paint.setFakeBoldText(true);
		
		Point pt = new Point ();
		proj.toPixels(this.point, pt);
		
		if (shadow == false)
		{
			canvas.drawCircle(pt.x, pt.y, 5, paint);
		}
		
	}

	@Override
	public boolean onTap(GeoPoint p, MapView mapView) 
	{
		// TODO Auto-generated method stub
		return super.onTap(p, mapView);
	}
	

}
